<!DOCTYPE html>
<html>
<head>
<title>Warcraft 3 Frames - Syntax</title>
</head>
<body>
<h2>Syntax</h2>
<p>A Frame Definition File is a fileType used in warcraft 3 to define an UI-Frame. Fdf has a second use case, they can define StringLists with such a StringList one can set Localized Strings.<br>Inside fdf one can write Text which is ignored by the fdf parser. There are Line comments and area commentents.<br>
<pre>// I am a Line comment

/* Opens the Area Comment
*
*
*/ End the Area Comment</pre></p>
<p>Fdf describes Frames and StringLists. The content of a fdf can be seen as a collection of fdfActions.</p>
<p>There exists something like 105 fdf-actions. Each of this actions is followed by a group of arguments which are either seperated by whitespace or by comma + optional whitespace. Between the first argument and the Action is whitespace. The used rule of seperation depends on the Action. Some FDF-Actions have multiple Versions with different amount of arguments.</p>
<p>An example for each:</p>
<ul>
<li>FontColor 0.99 0.827 0.0705 1.0,</li>
<li>FrameFont "EscMenuTextFont", 0.010, "",</li>
</ul>
<br>
<p>Actions not opening a Block { } end with a comma. Only the Actions: <b>Frame</b>, <b>String</b>, <b>Texture</b>, <b>Layer</b> and <b>StringList</b> open Blocks. All of them except for Layer can exist outside of Blocks. IncludeFile and StringList are Actions only written outside of Blocks. Other fdf-Actions have to be in a Block. Actions in a Block belong to the Action that started the Block most times defining a Frame. One Line can contain multiple Actions in a row without any Line seperator.</p>
<br>
<p>I personaly call Frames defined outside of Blocks MainFrame, when I talk about them. Only such MainFrames can be Created & Inherited. Frames can have any amount of Child-Frames which also can have Child-Frames, but each Frame has only one Parent.</p>
<p>For the Fdf-Action Frame: The names of MainFrames in one fdf have to be unique. If another MainFrame with the same name in the current fdf is encountered the remaining File-content is skiped. ChildFrames can have the same name as their brothers, their parent or be empty "".</p>
<p>Fdf Frames support a behaviour called INHERITS in which a Frame copys the Fdf Actions from another Frame. There also exists an advanced version INHERITS WITHCHILDREN, this also copies the Child-Frames and uses their fdf-Actions. In fdf the Frame one wants to inherit from has to be from the same fdf or from an included one.</p>
<br>
<p>Each Frame uses one of the Warcraft 3 FrameTypes, with the FrameType the behaviour and the set of possible fdf-Actions for that Frame is choosen. This FrameTypes can be placed into 2 groups SimpleFrames (all of them start with SIMPLE) and the others which I just call Frames (a bit confusing, cause all are Frames). One should do this seperation cause they have different features, techniques, rules and it is difficult to fit them together (logical not visual).</p>

<p>In fdf paths are written only with one "\".</p>

</body>
</html>
